<template>
  <div v-if="list.length > 0" style="display: inline-block;">
    <el-button
      style="margin-left: 8px;"
      v-for="item in list"
      :key="item.id"
      :type="item.type"
      :icon="item.icon"
      @click="callFunc(item.id)"
    >{{ item.label }}
    </el-button>
  </div>
</template>

<script>
import {ButtonList} from "@/views/component/toolbar/index";

export default {
  name: "index",
  props: {
    list: {
      type: Array,
      default() {
        return ButtonList
      }
    }
  },
  methods: {
    callFunc(methodName) {

      this.$emit("callFunc", methodName)

    }
  }
}
</script>

<style scoped>

</style>
